﻿@model ClinicaDentalApp.Models.Ficha.FichaInputModel

@{
    ViewBag.Title = "DatosFicha";
    Layout = null;
}

@{
    
    var listaSexos = new List<object>();
    listaSexos.Add(new { text = "Masculino", value = true });
    listaSexos.Add(new { text = "Femenino", value = false });  
}

<h2>Datos Paciente</h2>

<script language="javascript" type="text/javascript">
    $(function () {
        $("#fechaNacimiento").datepicker(
            {
                dateFormat: "dd/mm/yy",
                yearRange: "-90,-1",
                changeMonth: true,
                changeYear: true
            }
          );
       // $("#fechaNacimiento").val("");
    });
</script>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div>
@using (Html.BeginForm("DatosFicha","Pacientes", FormMethod.Post)) {
    @Html.ValidationSummary(true)
    <div class="FormHora">
        <h2>Datos Generales</h2>
        <div style="float:left;">
            <div class="editor-label">
                @Html.LabelFor(model => model.Rut)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Rut)
                @Html.ValidationMessageFor(model => model.Rut)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Nombre)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Nombre)
                @Html.ValidationMessageFor(model => model.Nombre)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.ApellidoPaterno)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ApellidoPaterno)
                @Html.ValidationMessageFor(model => model.ApellidoPaterno)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.ApellidoMaterno)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ApellidoMaterno)
                @Html.ValidationMessageFor(model => model.ApellidoMaterno)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.FechaNacimiento)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(model => model.FechaNacimiento, new { @id = "fechaNacimiento" })
                @Html.ValidationMessageFor(model => model.FechaNacimiento)
            </div>
        </div>
        <div style="float:right;">
            <div class="editor-label">
                @Html.LabelFor(model => model.Direccion)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Direccion)
                @Html.ValidationMessageFor(model => model.Direccion)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.Telefono)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Telefono)
                @Html.ValidationMessageFor(model => model.Telefono)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Actividad)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Actividad)
                @Html.ValidationMessageFor(model => model.Actividad)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.sexo)
            </div>
            <div class="editor-field">
                @Html.DropDownListFor(model => model.sexo, new SelectList(listaSexos, "value", "text"), new { @id = "sexoPaciente" })
                @Html.ValidationMessageFor(model => model.sexo)
            </div>
        </div>
    </div>
    <div class="EspacioBlanco"> </div>
    <div class="FormHora2">
        <h2>Datos Clinicos</h2>
        <div style="float:left;">
            <div class="editor-label">
                @Html.LabelFor(model => model.IsDiabetico)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsDiabetico)
                @Html.ValidationMessageFor(model => model.IsDiabetico)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.IsCardiopatia)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsCardiopatia)
                @Html.ValidationMessageFor(model => model.IsCardiopatia)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.IsAlergico)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsAlergico)
                @Html.ValidationMessageFor(model => model.IsAlergico)
            </div>
        </div>
        <div style="float:right;">
            <div class="editor-label">
                @Html.LabelFor(model => model.IsHipertenso)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsHipertenso)
                @Html.ValidationMessageFor(model => model.IsHipertenso)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.IsEmbarazado)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsEmbarazado)
                @Html.ValidationMessageFor(model => model.IsEmbarazado)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.AnamnesisRemota)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.AnamnesisRemota)
                @Html.ValidationMessageFor(model => model.AnamnesisRemota)
            </div>
        </div>
        </div>
    
    <div class="FormHora5"> 
        <p>
            <input type="submit" value="Guardar" />
            
        </p></div>
}

<div> 
            <p>
                 @Html.ActionLink("Volver atrás", "FichasPacientes")
            </p></div>
          
</div>